﻿<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="ThemSanPham.aspx.cs" Inherits="WebsiteBanHang.About" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>

<asp:Content ID="AddContent" runat="server" ContentPlaceHolderID="Content1">      

    <asp:Label ID="Label1" runat="server" Text="Nhập mã sản phẩm:"></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <br />
    <asp:Label ID="Label2" runat="server" Text="Nhập tên sản phẩm:"></asp:Label>
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <br />
    <asp:Image ID="Image1" runat="server" Width="120px" Height="120px" 
        ImageAlign="Middle" BorderStyle="Solid" ImageUrl="../images/NOimage.jpg"/>
    <br />
    <asp:Label ID="Label9" runat="server" Text="Tên hình: "></asp:Label>
    <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
    <br />
    <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" ForeColor="Blue" Font-Bold="true">Xem hình</asp:LinkButton>
    <br />
    <asp:Label ID="Label3" runat="server" Text="Chọn hình ảnh:"></asp:Label>
    <asp:FileUpload ID="FileUpload1" runat="server" />  

    <asp:RegularExpressionValidator
	ID="RegularExpressionValidator1"
	runat="server"
	ControlToValidate="FileUpload1"
	ErrorMessage="Không phải file ảnh"
	ValidationExpression=
"^([0-9a-zA-Z_\-~ :\\.])+(.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$">
</asp:RegularExpressionValidator>

    <br />
    <asp:Label ID="Label4" runat="server" Text="Chọn nhà sản xuất:"></asp:Label>
    <asp:DropDownList ID="ddlnhaSanXuat" runat="server" Width="165px">
    </asp:DropDownList>
    <br />
    <asp:Label ID="Label5" runat="server" Text="Chọn loại sản phẩm:"></asp:Label>
    <asp:DropDownList ID="ddlloaiSanPham" runat="server" Width="165px" 
        AutoPostBack="true" 
        onselectedindexchanged="ddlloaiSanPham_SelectedIndexChanged">
    </asp:DropDownList>
    <br />    
    <asp:Label ID="Label6" runat="server" Text="Giá bán:"></asp:Label>
    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <br />    
    <asp:Label ID="Label7" runat="server" Text="Phần trăm khuyến mãi:"></asp:Label>

    <asp:RadioButtonList ID="RadioButtonList1" runat="server">
        <asp:ListItem Value="0">0%</asp:ListItem>
        <asp:ListItem Value="0.1">10%</asp:ListItem>
        <asp:ListItem Value="0.2">20%</asp:ListItem>
        <asp:ListItem Value="0.3">30%</asp:ListItem>
    </asp:RadioButtonList>
    <br />
    <asp:Label ID="Label8" runat="server" Text="Số lượng"></asp:Label>
    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
    <br />

    <asp:Label ID="Label12" runat="server" Text="Mô tả sản phẩm"></asp:Label><asp:TextBox ID="TextBox7" runat="server" Height="80px" Width="400px"></asp:TextBox>

    <h2>Thông số kỹ thuật</h2>


    <asp:Repeater ID="Repeater1" runat="server" 
        onitemcommand="Repeater1_ItemCommand" onitemdatabound="Repeater1_ItemDataBound">
        <HeaderTemplate>
           <table style="width: 97% ; margin: 0 0px 0 10px;  ">
                <tbody>
        </HeaderTemplate>
       <ItemTemplate>
           <tr align="left" bgcolor="white">
              <th width="130px" style=" margin: 0 0 0 15px; padding: 3px 8px; font-size: 12px; font-weight:bold; border-bottom: 1px solid #D9DDE3; border-right: 1px solid #D9DDE3;">
                    <asp:Label ID="Label10" runat="server" Text=<%# ((System.Xml.XmlNode)Container.DataItem).Attributes["ThongSo"].Value%>></asp:Label>
                </th>
              <th style="padding: 3px 8px; font-size: 12px; font-weight:bold; border-bottom: 1px solid #D9DDE3; border-right: 1px solid #D9DDE3;" width="150px">
                    <asp:Label ID="Label11" runat="server" Text=<%# ((System.Xml.XmlNode)Container.DataItem).Attributes["DacTinh"].Value%>></asp:Label>
                </th>
              <th style=" margin: 0 0 0 0px; padding: 3px 3px; font-size: 12px; font-weight:bold; border-bottom: 1px solid #D9DDE3; ">
                  <asp:TextBox ID="TextBox5" runat="server" Width="99%"></asp:TextBox>
                </th>
           </tr>
       </ItemTemplate>
       <FooterTemplate>
            </tbody>
          </table>
       </FooterTemplate>

    </asp:Repeater>  
    
    <br />
    <asp:Button ID="Button2" runat="server" Text="Thêm sản phẩm" onclick="Button2_Click" />

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
</asp:Content>
